{extend name="public/base" /}

{block name="title"}<title>积分记录</title>{/block}

{block name="pjax_container"}
<section class="content-header">
    <h1>积分记录</h1>
    <ol class="breadcrumb">
        <li class="active"><i class="fa fa-dashboard"></i> 积分记录</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <div class="" style="top:10px;">
                        <form action="{:search_url(['status','s_time','e_time','search'])}" method="GET" pjax-search="">
                            <div class="input-group input-group-sm">
                                <div style="float:right;">
                                    <select name="type" style="width: 100px;display: inline-block;margin: 0px 5px;padding-left: 3px;border: 1px solid #ccc;height: 28px;border-radius: 3px;">
                                        <option value="">积分类型</option>
                                        {foreach name="points_type" item="vo" key="ko"}
                                            {if condition="input('get.type') == $ko"}
                                                <option value="{$ko}" selected="selected">{$vo}</option>
                                            {else/}
                                                <option value="{$ko}">{$vo}</option>
                                            {/if}
                                        {/foreach}
                                    </select>
                                    <input type="text" style="display: inline-block;width: 200px;margin: 0px 5px;padding-left: 3px;border: 1px solid #ccc;height: 28px;border-radius: 3px;" name="search" class="" value="{:input('get.search')}" placeholder="{$_GET['search']|default='用户昵称'}" />
                                    <div class="input-group-btn" style="display: inline-block;">
                                        <button type="submit" class="btn btn-default sreachs">
                                            <i class="fa fa-search"></i>查询
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="box-body table-responsive">
                    <table class="table table-bordered table-hover">
                        <tr>
                            <th>ID</th>
                            <th>用户昵称</th>
                            <th>积分类型</th>
                            <th>积分变动</th>
                            <th>说明</th>
                            <th>记录时间</th>
                        </tr>
                        {volist name="data" id="v"}
                        <tr>
                            <td>{$v["id"]}</td>
                            <td>
                                <a href="{:url('client_user/edit', ['id'=>$v.user_id])}" target="_blank">{$v.nickname}</a>
                            </td>
                            <td>{$v.TypeStr}</td>
                            <td>{$v.PointsStr}</td>
                            <td>{$v["desc"]}</td>
                            <td>{$v["create_time"]}</td>
                        </tr>
                        {/volist}
                    </table>
                </div>
                <div class="box-footer clearfix">
                    {$data->render()}
                </div>
            </div>
        </div>
    </div>
</section>
{/block}
